# -*- coding=utf-8
from qcloud_cos import CosConfig
from qcloud_cos import CosS3Client
from django.conf import settings
import os,django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "s28.settings")# project_name 项目名称
django.setup()





secret_id = settings.TENCENT_COS_ID
secret_key = settings.TENCENT_COS_KEY
region = 'ap-nanjing'



config = CosConfig(Region=region, SecretId=secret_id, SecretKey=secret_key)
client = CosS3Client(config)


client.delete_object(
    Bucket='daihui-1311491624',
    Key='p1.png',
)
